const http = require('http');
const fs = require('fs');
const {httpReadFile} = require('./utils/file-util')
const server = http.createServer();

server.listen(5555, function () {
    console.log("留言板服务启动成功~");
})


server.on('request', function (request, response) {
    if (request.url === '/') {
        fs.readFile('./views/index.html', function (error, data) {
            response.end('data')
        })
        htt

    } else {
        fs.readFile('./views/error.html', function (error,data) {
            response.end(data)
        })
    }
})


